// backend/src/utils/functionalTools.js
class functionalTools {
    /**
     * @description 获取请求的 IP 地址
     * @param {Object} req - 请求对象
     * @returns {string} 返回 IP 地址
     */
    static getIpAddress = (req) => {
        return req.headers['x-forwarded-for'] || req.connection.remoteAddress || req.socket.remoteAddress || req.ip;
    };
}

export default functionalTools;
